package com.todo.pro.handle;

public enum EE {
	SUCCESS_LOGIN(20001, "登录成功"),
	SUCCESS_OP(20002, "操作成功"),
	
	
	ERROR_LOGIN_PSW(50001, "登录密码错误"),
	ACCOUNT_LOCKED(50002, "帐号已被锁定"),
	ACCOUNT_DISABLED(50003, "帐号未被启用"),
	UNKNOWN_ACCOUNT(50004, "帐号不存在"),
	NO_AUTHORIZED(50005, "未授权"),
	
	
	ERR_FOR_WAIT(50006, "请稍后重试"),
	

	NO_INPUT_VCODE(50007, "请输入验证码"),
	VCODE_ERROR(50008, "验证码输入错误"),
	NO_INPUT_LOGINAME(50009, "请输入登录名称"),
	NO_INPUT_LOGINPSW(50010, "请输入登录密码"),
	

	ERROR_FORM(50011, "表单错误"),
	ERROR_FORM_OVERDUE(50012, "页面已过期，请刷新后重试"),

	NO_INPUT_ORIGINAL_PSW(50013, "请输入原密码"),
	NO_INPUT_NEW_PSW(50014, "请输入新密码"),
	NO_INPUT_RENEW_PSW(50015, "请重复输入新密码"),
	INPUT_PSW_MISMATCH(50016, "新密码输入不匹配"),
	NEW_PSW_MISMATCH(50017, "新密码输入不匹配"),
	ORIGINAL_PSW_MISMATCH(50018, "原密码输入错误"),
	

	INVALID_PARAMETERS(50019, "无效的参数"),

	LOGIN_TIMEOUT(50020, "登录超时"),
	LOGIN_TIMEOUT_SKIP(50021, "登陆超时，请登陆后访问"),
	
	NO_AUTHORIZED_SKIP(50022, "暂无权访问"),

	PHONE_NO_FORMAT_ERRPR(50023, "手机号格式错误"),
	EMAIL_FORMAT_ERRPR(50024, "邮箱格式错误"),

	LOGIN_NAME_EXSIT(50025, "登录名已存在"),

	SELECT_LEAST_ONE_RECORD(50026, "至少选择一条记录"),
	
	DELETE_EXSIT_CHILDS(50027, "不能删除存在子级记录的数据"),

	SYSTEM_ERROR_1(90001, "请求失败！可能原因：1.参数错误；2.网络错误；3.服务器异常。"),
	SYSTEM_ERROR_2(90002, "不支持当前类型请求,只允许以下请求类型：%s"),
	SYSTEM_ERROR_3(90003, "类型转换错误，参数丢失"),
	SYSTEM_ERROR_4(90004, "缺少必要参数,参数名称为：%s"),
	SYSTEM_ERROR_5(90005, "请求头信息格式不支持，%s"),
	SYSTEM_ERROR_6(90006, "参数类型不匹配，参数 %s 类型应该为  %s");

	private int code;
	private String message;

	private EE(int code, String message) {
		this.code = code;
		this.message = message;
	}

	public String i() {
		return String.format("(%d)%s", code, message);
	}
}
